<?php
/**
 * 默认展示页面
 *
 *
 *
 * @网店运维提供技术支持 授权请购买shopnc授权
 * @license    http://www.shopwwi.com
 * @link       交流群号：111731672
 */


defined('InShopNC') or exit('Access Invalid!');
class jewelryControl extends BaseHomeControl{
    public function indexOp(){
        Language::read('home_index_index');
        Tpl::output('index_sign','jewelry');

        //专题广告
        $model_ztadv = Model("ztadv");
        $top_adv_list = $model_ztadv->getAdvList(array('style'=>4,'state'=>1,'place'=>1,'start_time'=>array('lt',time()),'end_time'=>array('gt',time())),4);
        Tpl::output('adv_list',$top_adv_list);

        $slider_list = $model_ztadv->getAdvList(array('style'=>4,'state'=>1,'place'=>2,'start_time'=>array('lt',time()),'end_time'=>array('gt',time())),4);
        Tpl::output('slider_list',$slider_list);

        Tpl::output('zb_hot_search',C('zb_hot_search'));

        //团购专区
        Language::read('member_groupbuy');

        $model_groupbuy = Model('groupbuy');
        $group_list = $model_groupbuy->getGroupbuyCommendedList(4);

        Tpl::output('group_list', $group_list);
        //限时折扣
        $model_xianshi_goods = Model('p_xianshi_goods');
        $xianshi_item = $model_xianshi_goods->getXianshiGoodsCommendList(8,5);
        Tpl::output('xianshi_item', $xianshi_item);

        $model_b_promotion = Model("b_promotion");
        $specials = $model_b_promotion->getPromotion(array('place'=>5,'status'=>1) ,'*', 4, 'start_time asc');
        Tpl::output('specials',$specials);

        //推荐品牌
        $model_brand = Model("brand");
        $home_brands = $model_brand->getBrandList(array('brand_apply'=>1,'brand_class'=>'珠宝'),'*', 0, 'brand_sort asc, brand_id desc', 15);
        Tpl::output('brands_list',$home_brands);

		//评价信息
        $goods_evaluate_info = Model('evaluate_goods')->getEvaluateGoodsList(8);
        Tpl::output('goods_evaluate_info', $goods_evaluate_info);
        //预售、预定商品
        $model_presale = Model("presale_promotion");
        $condition = array('presale_promotion'=>array('status'=>1,'place'=>5,'start_time'=>array('lt',time()),'end_time'=>array('gt',time())));
        $goods_list = $model_presale->getPresaleGoodsList($condition,  '*', 8, 'rand()');
        Tpl::output('goods_list', $goods_list);

        //板块信息
        $model_web_config = Model('web_config');
        $web_html = $model_web_config->getWebHtml('jewel');
        Tpl::output('web_html',$web_html);

        $gold_sliders = $model_web_config->getWebHtml('gold_sale');
        Tpl::output('gold_slider',$gold_sliders);

        Model('seo')->type('jewelry')->show();

        Tpl::showpage('jewelry');
    }

}
